package com.watson.s2sh.platform.service;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.watson.s2sh.platform.dao.MenuDao;
import com.watson.s2sh.platform.domain.Menu;

@Transactional
public class MenuServiceImpl implements MenuService{
	
	private MenuDao menuDao;
	
	@Transactional(propagation = Propagation.REQUIRED)  
    public void save(Menu menu){  
		menuDao.save(menu);  
    }
      
    @Transactional(propagation = Propagation.REQUIRED)  
    public Menu get(Long id){  
        return menuDao.get(id);  
    }
    
    @Transactional(propagation = Propagation.REQUIRED)  
    public void delete(Menu menu){
    	menuDao.delete(menu);
    }
    
    @Transactional(propagation = Propagation.REQUIRED)  
	public List<Menu> findAllMenu() {
		return menuDao.findAllMenu();
	}

	public MenuDao getMenuDao() {
		return menuDao;
	}

	public void setMenuDao(MenuDao menuDao) {
		this.menuDao = menuDao;
	}
	
}
